package org.cloud.server;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;


import java.io.*;

@SpringBootApplication
@EnableEurekaServer
public class EurekaServer {

    public static void main(String[] args) {
        SpringApplication.run(EurekaServer.class);
    }

//    @JmsListener(destination = "downlink")
//    public  void jmsMessaes(Object message) throws JMSException {
//        System.out.println(message);
//        if(message instanceof TextMessage){
//            TextMessage textMessage= (TextMessage) message;
//            try {
//                FileWriter fileWriter=new FileWriter("E://zappp//message.txt",true);
//                fileWriter.write("\n******************************\n");
//                fileWriter.write(textMessage.getText());
//                fileWriter.close();
//            } catch (FileNotFoundException e) {
//                e.printStackTrace();
//            } catch (IOException e) {
//                e.printStackTrace();
//            }
//        }
//
//    }
}
